import Vue from 'vue'
import VueRouter from 'vue-router'




Vue.use(VueRouter)

const routes = [

  {
    path: '/smart',
    name: 'smart',
    component: () => import('@v/my/smart.vue')
  },
  //帮助反馈
  {
    path: '/help',
    name: 'help',
    component: () => import('@v/my/help/help.vue'),
    children:[
        {
            path:'/helpfirst',
            name:"helpfirst",
            component:()=> import('@v/my/help/first.vue')
        },
        {
            path:'/helpsecond',
            name:"helpsecond",
            component:()=> import('@v/my/help/second.vue')
        },
        {
            path:'/helpthird',
            name:"helpthird",
            component:()=> import('@v/my/help/third.vue')
        },
        {
            path:'/helpfourth',
            name:"helpfourth",
            component:()=> import('@v/my/help/fourth.vue')
        },
        {
            path:'/helpfifth',
            name:"helpfifth",
            component:()=> import('@v/my/help/fifth.vue')
        },
        {
            path:'/helpsixth',
            name:"helpsixth",
            component:()=> import('@v/my/help/sixth.vue')
        },
    ]
  },
    {
        path: '/cards',
        name: 'cards',
        component: () =>
            import ('@v/my/giftcards/cards.vue'),
        children: [{
                path: '/all',
                name: "All",
                component: () =>
                    import ('@v/my/giftcards/all.vue')
            },
            {
                path: '/newest',
                name: "Newest",
                component: () =>
                    import ('@v/my/giftcards/newest.vue')
            },
        ]
    },

  {
  path: '/home',
  name: 'home',
  component: () => import ('@v/home/home.vue'),
  children: [
      {
        path:'/newm',
        name:"Newm",
        component:()=> import('@v/home/hometrouter/newm.vue')
      },
      {
          path: '/cwater',
          name: 'Cwater',
        component:()=> import('@v/home/hometrouter/cwater.vue')
      },
      {
          path: '/self',
          name: 'Self',
        component:()=> import('@v/home/hometrouter/self.vue')
      },
      {
          path: '/snacks',
          name: 'Snacks',
        component:()=> import('@v/home/hometrouter/snacks.vue')
         
      },
  ]

    //   {
    //     path: '/tide',
    //     name: 'tide',
    //     component: () => import('@v/tide/tide.vue')
    //   },
    // {
    //     path: '/tidedetail',
    //     name: 'tidedetail',
    //     component: () =>
    //         import ('@v/tide/tide_detail.vue')
    // },
    // {
    //     path: '/tidecoupon',
    //     name: 'tidecoupon',
    //     component: () => import('@v/tide/tide_coupon.vue')
    //   },
    // {
    //     path: '/details',
    //     name: 'details',
    //     component: () =>
    //         import ('@v/else/details.vue')
    // },
    //   {
    //     path: '/loginfirst',
    //     name: 'loginfirst',
    //     component: () => import('@v/login/first.vue')
    //   },
    //   {
    //     path: '/loginsecond',
    //     name: 'loginsecond',
    //     component: () => import('@v/login/second.vue')
    //   },
  },
  {
    path: '/combo',
    name: 'Combo',
    component: () => import('@v/home/combo.vue')
  },
  {
    path: '/equity',
    name: 'Equity',
    component: () => import('@v/home/equity.vue')
  },
  {
    path: '/wheel',
    name: 'Wheel',
    component: () => import('@v/home/wheel.vue')
  },
  {
    path: '/coupon',
    name: 'Coupon',
    component: () => import('@v/my/coupon.vue'),
    children:[
        {
          path:'/drink',
          name:"Drink",
          component:()=> import('@v/my/tcoupon/drink.vue')
        },
        {
          path:'/trend',
          name:"Trend",
          component:()=> import('@v/my/tcoupon/trend.vue')
        },
      ]
  },
  {
    path: '/gband',
    name: 'Gband',
    component: () => import('@v/home/gband.vue')
  },
{
    path: '/tidedetail',
    name: 'tidedetail',
    component: () =>
        import ('@v/tide/tide_detail.vue')
},
 {
        path: '/tidecoupon',
        name: 'tidecoupon',
        component: () => import('@v/tide/tide_coupon.vue')
      },
  {
    path: '/details',
    name: 'details',
    component: () => import('@v/else/details.vue')
  },

    {
        path: '/account',
        name: 'Account',

        component: () =>
            import ('@v/shop/account.vue')
    },
    {
        path: '/menu',
        name: 'menu',
        component: () =>
            import ('@v/menu/menu.vue')
    },
    {
        path: '/my',
        name: 'my',
        component: () =>
            import ('@v/my/my.vue'),
        children: [{
                path: '/Twoa',
                name: 'Twoa',
                component: () =>
                    import ('../views/my/My_two/Twoa.vue')
            },
            {
                path: '/Twob',
                name: 'Twob',
                component: () =>
                    import ('../views/my/My_two/Twob.vue')
            },
            {
                path: '/Twoc',
                name: 'Twoc',
                component: () =>
                    import ('../views/my/My_two/Twoc.vue')
            },
            {
                path: '/Twod',
                name: 'Twod',
                component: () =>
                    import ('../views/my/My_two/Twod.vue')
            },
        ]
    },

    //账户余额引用配置
    {
        path: '/my_user_balance',
        name: 'my_user_balance',
        component: () =>
            import ('../views/my/my_user_balance.vue')
    },

    //我的订单配置
    {
        path: '/myorder',
        name: 'myorder',
        component: () =>
            import ('@v/my/myorder.vue'),
        //     children: [{
        //         path: '/myordersona',
        //         name: 'myordersona',
        //         component: () =>
        //             import ('../views/my/myordersona.vue')
        //     },
        //     {
        //         path: '/myordersonb',
        //         name: 'myordersonb',
        //         component: () =>
        //             import ('../views/my/myordersonb.vue')
        //     },
        //     {
        //         path: '/myordersonc',
        //         name: 'myordersonc',
        //         component: () =>
        //             import ('../views/my/myordersonc.vue')
        //     },
        // ]
    },
    {
        path: '/power',
        name: 'power',
        component: () =>
            import ('@v/my/power.vue')
    },
    {
        path: '/mypersonaddress',
        name: 'mypersonaddress',
        component: () =>
            import ('@v/my/mypersonaddress.vue')
    },

    //我的订单配置
    {
        path: '/invoice',
        name: 'invoice',
        component: () =>
            import ('@v/my/invoice.vue')
    },
    //反馈
    {
        path: '/feedback',
        name: 'feedback',
        component: () =>
            import ('@v/my/feedback.vue')
    },

    {
        path: '/invoiceorder',
        name: 'invoiceorder',
        component: () =>
            import ('@v/my/invoiceorder.vue')
    },

    {
        path: '/Myfriend',
        name: 'Myfriend',
        component: () =>
            import ('../views/my/friend/Myfriend.vue'),
        
    },
    
        //我的订单配置
        {
            path: '/invoice',
            name: 'invoice',
            component: () =>
                import ('@v/my/invoice.vue')
        },
        //反馈
        {
            path: '/feedback',
            name: 'feedback',
            component: () =>
                import ('@v/my/feedback.vue')
        },
    
        {
            path: '/invoiceorder',
            name: 'invoiceorder',
            component: () =>
                import ('@v/my/invoiceorder.vue')
        },

        {
            path: '/Myweek',
            name: 'Myweek',
            component: () =>
                import ('../views/my/friend/Myweek.vue')
        },


    {
        path: '/mycoffee',
        name: 'mycoffee',
        component: () =>
            import ('@v/my/mycoffee.vue')
    },
    {
        path: '/myrecruit',
        name: 'myrecruit',
        component: () =>
            import ('@v/my/myrecruit.vue')
    },
    {
        path: '/myperson',
        name: 'myperson',
        component: () =>
            import ('@v/my/myperson.vue')
    },
//123
    {
        path: '/shop',
        name: 'shop',
        component: () =>
            import ('@v/shop/shop.vue')
    },
    {
        path: '/tide',
        name: 'tide',
        component: () =>
            import ('@v/tide/tide.vue')
    },
    {
        path: '/tidetype',
        name: 'tidetype',
        component: () =>
            import ('@v/tide/tide_type.vue')
    },
    {
        path: '/loginfirst',
        name: 'loginfirst',
        component: () =>
            import ('@v/login/first.vue')
    },
    {
        path: '/loginsecond',
        name: 'loginsecond',
        component: () =>
            import ('@v/login/second.vue')
    },
    {
        path: '/writedata',
        name: 'writedata',
        component: () =>
            import ('@v/login/writedata.vue')
    },
    {
        path: '/reg',
        name: 'reg',
        component: () =>
            import ('@v/register/register.vue')
    },


    // 潮品分类
    {
        path: '/goodsmenu',
        name: 'goodsmenu',
        component: () =>
            import ('@v/tide/goodsmenu.vue'),
        children: [{
                path: '/gmenua',
                name: 'gmenua',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenua.vue')
            },
            {
                path: '/gmenub',
                name: 'gmenub',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenub.vue')
            },
            {
                path: '/gmenuc',
                name: 'gmenuc',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenuc.vue')
            },
            {
                path: '/gmenud',
                name: 'gmenud',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenud.vue')
            },
            {
                path: '/gmenue',
                name: 'gmenue',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenue.vue')
            },
            {
                path: '/gmenuf',
                name: 'gmenuf',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenuf.vue')
            },
            {
                path: '/gmenug',
                name: 'gmenug',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenug.vue')
            },
            {
                path: '/gmenuh',
                name: 'gmenuh',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenuh.vue')
            },
            {
                path: '/gmenui',
                name: 'gmenui',
                component: () =>
                    import ('@v/tide/goodsmenu/goodsmenui.vue')
            }
        ]
    },
   // 潮品分类
    {
        path: '/',
        redirect: "/newm"
    },
    {
        path: '/*',
        name: 'No',
        component: () =>
            import ('@v/else/no.vue')
    },
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
